function filterResult(err, docs) {
  return new Promise((resolve, reject) => {
    if(err) {
      resolve({
        code: 500,
        message: err
      })
    } else {
      if(docs) {
        resolve({
          code: 200,
          message: '登录成功',
          data: docs
        })
      } else {
        resolve({
          code: 404,
          message: '查找不到对应的数据'
        })
      }
    }
  })
}
module.exports = {
  filterResult
}